Page({
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id=' + this.data.id,
    })
  },

  onLoad({ id }) {
    this.getDetail(id)
  },

  async getDetail(id) {
    const { code, data: info } = await wx.http({
      url: '/room/' + id,
    })
    if (code !== 10000) return wx.toast()

    this.setData({ ...info })
  },
})
